{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=293
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	n,m:longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n,m);
if n>m then write(1) else
if m>n then write(2) else write(0);
end.